<?php

class Silk_Zgb_Block_Renderer_Rolename extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
	public function render(Varien_Object $row)
	{
		$id =  $row->getUserId();
		$collection = Mage::getResourceModel('admin/role_collection')->addFieldToFilter("user_id",$id);
		$item = $collection->getFirstItem();
		$roleId =  $item->getParentId();
		$model = Mage::getResourceModel('admin/role_collection')->addFieldToFilter("role_id",$roleId);
		$item = $model->getFirstItem();
		$name = $item->getRoleName();
		return $name;
	}
}